﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="QLNhanVien.aspx.cs" Inherits="Web.Shalo.BanPMS1.Admin.QLNhanVien" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentAdmin" runat="server">
    <div id="page-heading">
		<h1>Quản Lý Nhân Viên</h1>
	</div>
	<!-- end page-heading -->

	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id="content-table-inner">
		
			<asp:MultiView ID="MultiView1" runat="server">
                <asp:View ID="View1" runat="server">
                    <table style="width: 100%">
                        <tr>
                            <td><h2>Danh Sách Nhân Viên</h2>
                                </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:GridView ID="GVNhanVien" runat="server" AutoGenerateColumns="False" 
                                    Width="707px" CssClass="mGrid" 
                                    onselectedindexchanging="GVNhanVien_SelectedIndexChanging" 
                                    onrowdeleting="GVNhanVien_RowDeleting" AllowPaging="True" 
                                    onpageindexchanging="GVNhanVien_PageIndexChanging" PageSize="5">
                                    <Columns>
                                        <asp:BoundField DataField="MaNV" HeaderText="Mã NV" />
                                        <asp:BoundField DataField="TenNV" HeaderText="Tên NV" />
                                        <asp:BoundField DataField="NgaySinh" HeaderText ="Ngày Sinh" />
                                        <asp:BoundField DataField="GioiTinh" HeaderText="Giới Tính" />
                                        <asp:BoundField DataField="DiaChi" HeaderText="Địa Chỉ" />
                                        <asp:BoundField DataField="Sdt" HeaderText="Số DT" />
                                        <asp:BoundField DataField="Email" HeaderText="Email" />
                                        <asp:ButtonField CommandName="Select" ControlStyle-CssClass="link" Text="Sửa" >
                                        <ControlStyle CssClass="link" />
                                        <ItemStyle HorizontalAlign="Center" />
                                        </asp:ButtonField>
                                        <asp:ButtonField CommandName="Delete" ControlStyle-CssClass="link"  Text="Xóa" >
                                        <ControlStyle CssClass="link" />
                                        <ItemStyle HorizontalAlign="Center" />
                                        </asp:ButtonField>
                                    </Columns>
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Button ID="btnTaoMoiNV" runat="server" Text="Tạo Mới Nhân Viên" 
                                    CssClass="btn" onclick="btnTaoMoiNV_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </asp:View>
                <br />
                <asp:View ID="View2" runat="server">
                    <table style="width: 100%">
                        <tr>
                            <td colspan="2"><h2>Cập Nhật Nhân Viên</h2>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                Họ tên:</td>
                            <td>
                                <asp:TextBox ID="txtTennv" runat="server" Height="30px" Width="340px"></asp:TextBox>
                                <asp:Label ID="labManv" runat="server" Text="Label" Visible="False"></asp:Label>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                    ControlToValidate="txtTennv" Display="Dynamic" ErrorMessage="(*)" 
                                    ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                Ngày sinh:</td>
                            <td>
                                <asp:Label ID="Label1" runat="server" Text="Ngày :"></asp:Label>
                                <asp:DropDownList ID="ddNgay" runat="server">
                                    <asp:ListItem>dd</asp:ListItem>
                                    <asp:ListItem>01</asp:ListItem>
                                    <asp:ListItem>02</asp:ListItem>
                                    <asp:ListItem>03</asp:ListItem>
                                    <asp:ListItem>04</asp:ListItem>
                                    <asp:ListItem>05</asp:ListItem>
                                    <asp:ListItem>06</asp:ListItem>
                                    <asp:ListItem>07</asp:ListItem>
                                    <asp:ListItem>08</asp:ListItem>
                                    <asp:ListItem>09</asp:ListItem>
                                    <asp:ListItem>10</asp:ListItem>
                                    <asp:ListItem>11</asp:ListItem>
                                    <asp:ListItem>12</asp:ListItem>
                                    <asp:ListItem>13</asp:ListItem>
                                    <asp:ListItem>14</asp:ListItem>
                                    <asp:ListItem>15</asp:ListItem>
                                    <asp:ListItem>16</asp:ListItem>
                                    <asp:ListItem>17</asp:ListItem>
                                    <asp:ListItem>18</asp:ListItem>
                                    <asp:ListItem>19</asp:ListItem>
                                    <asp:ListItem>20</asp:ListItem>
                                    <asp:ListItem>21</asp:ListItem>
                                    <asp:ListItem>22</asp:ListItem>
                                    <asp:ListItem>23</asp:ListItem>
                                    <asp:ListItem>24</asp:ListItem>
                                    <asp:ListItem>25</asp:ListItem>
                                    <asp:ListItem>26</asp:ListItem>
                                    <asp:ListItem>27</asp:ListItem>
                                    <asp:ListItem>28</asp:ListItem>
                                    <asp:ListItem>29</asp:ListItem>
                                    <asp:ListItem>30</asp:ListItem>
                                    <asp:ListItem>31</asp:ListItem>
                                </asp:DropDownList>
                                <asp:Label ID="Label2" runat="server" Text="Tháng :"></asp:Label>
                                <asp:DropDownList ID="ddThang" runat="server">
                                    <asp:ListItem>mm</asp:ListItem>
                                    <asp:ListItem>01</asp:ListItem>
                                    <asp:ListItem>02</asp:ListItem>
                                    <asp:ListItem>03</asp:ListItem>
                                    <asp:ListItem>04</asp:ListItem>
                                    <asp:ListItem>05</asp:ListItem>
                                    <asp:ListItem>06</asp:ListItem>
                                    <asp:ListItem>07</asp:ListItem>
                                    <asp:ListItem>08</asp:ListItem>
                                    <asp:ListItem>09</asp:ListItem>
                                    <asp:ListItem>10</asp:ListItem>
                                    <asp:ListItem>11</asp:ListItem>
                                    <asp:ListItem>12</asp:ListItem>
                                </asp:DropDownList>
                                <asp:Label ID="Label3" runat="server" Text="Năm :"></asp:Label>
                                <asp:TextBox ID="txtNam" runat="server" Height="30px" Width="65px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                Giới tính:</td>
                            <td>
                                <asp:DropDownList ID="ddGioiTinh" runat="server">
                                    <asp:ListItem Value="0">Nam</asp:ListItem>
                                    <asp:ListItem Value="1">Nữ</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                Địa chỉ:</td>
                            <td>
                                <asp:TextBox ID="txtDiachi" runat="server" Height="30px" 
                                    Width="380px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                    ControlToValidate="txtDiachi" Display="Dynamic" ErrorMessage="(*)" 
                                    ForeColor="Red"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                Số điện thoại:</td>
                            <td>
                                <asp:TextBox ID="txtSdt" runat="server" Height="30px" Width="380px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                    ControlToValidate="txtSdt" Display="Dynamic" ErrorMessage="Nhập Số" 
                                    ForeColor="Red" ValidationExpression="^\d+$" ValidationGroup="Check"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width: 124px; height: 30px;">
                                Email:</td>
                            <td style="height: 30px">
                                <asp:TextBox ID="txtEmail" runat="server" Height="30px" Width="380px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                    ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="Nhập Email" 
                                    ForeColor="Red" 
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                                    ValidationGroup="Check"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 124px">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                         <tr>
                            <td style="width: 124px">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>

                         <tr>
                            <td style="width: 124px">
                                &nbsp;</td>
                            <td>
                           
                                <asp:Button ID="btnThemNV" CssClass="btn" runat="server" Text="Tạo Mới " 
                                    onclick="btnThemNV_Click" />
                                    <asp:Button ID="btnSua" runat="server" Text="Lưu"  CssClass="btn" 
                                    onclick="btnSua_Click"/>
                                <asp:Button ID="btnHuy" CssClass="btn" runat="server" Text="Hủy" 
                                    onclick="btnHuy_Click" CausesValidation="False" />
                             </td>
                        </tr>
                    </table>
                </asp:View>
            </asp:MultiView>
			</div>
			<!--  end table-content  -->
	
			<div class="clear"></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>
</asp:Content>
